home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: jdmorris@ix.netcom.com (Jason D. Morris)
- Newsgroups: comp.lang.c++
- Subject: Re: template classes in dll? (VC++ 4.0)
- Date: Thu, 14 Mar 1996 01:55:52 GMT
- Organization: Netcom
- Message-ID: <31477c5a.1116465@nntp.ix.netcom.com>
- References: <1996Mar6.133456.3709@cs.mun.ca> <313E48F6.41C67EA6@sparky.hampshire.ma.us>
- NNTP-Posting-Host: pon-mi2-13.ix.netcom.com
- X-NETCOM-Date: Wed Mar 13 5:55:06 PM PST 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- On Wed, 06 Mar 1996 21:24:54 -0500, Scott Reed
- <scott@sparky.hampshire.ma.us> wrote:
-
- >I'm having difficulty building a VC++ 4.0 dll with template classes.
- >The way I'm using the DllExport spec (actually __declspec(dllexport))
- >doesn't appear to fit the syntax for template classes, i.e.
- > template <class T> class DllExport ListOf {...};
- >results in a syntax error ("error C2960: template 'class' requires a
- >tag-name"). I've searched the online help for hours but I can't figure
- >this out. I'd really appreciate any help on this.
-
- It's not possible to generate object code for a template class. In
- other words, you can't compile a template class like you can a normal
- class. For the time being, the only option is to distribute template
- classes in the form of header files.
-
- Jason
-
-